{ "swagger": "2.0", "info": { "version": "1.0.0", "title": "Address Labs", "description": "A free API which parses an address within the United States into it's individual components.", "contact": { "name": "Richard Wilson", "email": "richard.a.wilson@microsoft.com", "url": "https://www.richardawilson.com/" } }, "host": "api.addresslabs.com", "basePath": "/v1", "schemes": ["http"], "consumes": ["application/json"], "produces": ["application/json"], "paths": { "/parsed-address": { "post": { "summary": "Parse Address", "description": "Returns the parsed address information from a single address string.", "operationId": "ParseAddress", "consumes": ["application/json"], "produces": ["application/json"], "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "address": { "type": "string", "description": "The address you would like to parse, e.g., '5404 Wisconsin Ave #700 Chevy Chase MD 20815'", "x-ms-visibility": "important", "x-ms-summary": "Address" } }, "required": ["address"], "example": { "address": "5404 Wisconsin Ave #700 Chevy Chase MD 20815" } } } ], "responses": { "200": { "description": "The response containing the parsed address attributes.", "schema": { "type": "object", "properties": { "number": { "type": "string", "description": "Street number.", "x-ms-summary": "Street Number" }, "street": { "type": "string", "description": "Street name.", "x-ms-summary": "Street Name" }, "street_suffix": { "type": "string", "description": "Street suffix, for example 'St', 'Rt', 'Ave', etc.", "x-ms-summary": "Street Suffix" }, "unit": { "type": "string", "description": "Unit.", "x-ms-summary": "Unit" }, "unit_designator": { "type": "string", "description": "Unit designator, for example 'Apt', 'Ste', 'Ut', etc.", "x-ms-summary": "Unit Designator" }, "street_pre_direction": { "type": "string", "description": "Directional designator appearing before street name, e.g., 'N' in '1 N Main St'.", "x-ms-summary": "Street Pre Direction" }, "street_post_direction": { "type": "string", "description": "Directional designator appearing after street name, e.g., 'NW' in '901 K St NW'.", "x-ms-summary": "Street Post Direction" }, "street2": { "type": "string", "description": "Second street name, if the address is an intersection of two streets.", "x-ms-summary": "Second Street Name" }, "street2_suffix": { "type": "string", "description": "Suffix of the second street.", "x-ms-summary": "Second Street Suffix" }, "street2_pre_direction": { "type": "string", "description": "Directional designator appearing before the second street name.", "x-ms-summary": "Second Street Pre Direction" }, "street2_post_direction": { "type": "string", "description": "Directional designator appearing after the second street name.", "x-ms-summary": "Second Street Post Direction" }, "city": { "type": "string", "description": "City.", "x-ms-summary": "City" }, "state": { "type": "string", "description": "State abbreviation.", "x-ms-summary": "State" }, "state_fips": { "type": "string", "description": "State FIPS code.", "x-ms-summary": "State FIPS Code" }, "zip": { "type": "string", "description": "5-digit ZIP code.", "x-ms-summary": "ZIP Code" }, "zip4": { "type": "string", "description": "Plus-four ZIP digits.", "x-ms-summary": "ZIP+4 Code" }, "intersection": { "type": "boolean", "description": "Boolean indicating whether the address is an intersection or not.", "x-ms-summary": "Is Intersection" }, "delivery": { "type": "object", "properties": { "address_line": { "type": "string", "description": "First line of the address formatted following USPS guidelines.", "x-ms-summary": "Delivery Address Line" }, "last_line": { "type": "string", "description": "Second line of the address formatted following USPS guidelines.", "x-ms-summary": "Delivery Last Line" } } }, "input": { "type": "string", "description": "Input address string.", "x-ms-summary": "Input Address" } } }, "examples": { "application/json": { "number": "5404", "street": "Wisconsin", "street_suffix": "Ave", "unit": "700", "city": "Chevy Chase", "state": "MD", "state_fips": "24", "zip": "20815", "intersection": false, "delivery": { "address_line": "5404 Wisconsin Ave # 700", "last_line": "Chevy Chase MD 20815" }, "input": "5404 Wisconsin Ave #700 Chevy Chase MD 20815" } } }, "406": { "description": "Address could not be parsed" }, "500": { "description": "The API is down" }, "502": { "description": "Bad gateway" }, "503": { "description": "Service unavailable" }, "504": { "description": "Gateway timeout" } } } } }, "definitions": {}, "parameters": {}, "responses": {}, "securityDefinitions": {}, "security": [], "tags": [], "x-ms-connector-metadata": [ { "propertyName": "Website", "propertyValue": "https://addresslabs.com/" }, { "propertyName": "Privacy policy", "propertyValue": "https://addresslabs.com/" }, { "propertyName": "Categories", "propertyValue": "Data" } ] }